/***** dialog *****/
@media (prefers-color-scheme: dark) {
    .plugin-preferences-dialog {
        filter: invert(.9) hue-rotate(.5turn);
    }
}

.plugin-preferences-dialog {
    display: flex;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: calc(100vh - 150px);
    border-radius: 8px;
    box-shadow: 2px 2px 4px #dbdbdb, -2px -2px 4px #dbdbdb;
    flex-direction: column;
    z-index: 10000;
    font-size: 14px;
    font-family: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: rgb(65, 84, 98);
}

.plugin-preferences-dialog ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

.plugin-preferences-dialog ::-webkit-scrollbar-track {
    border-radius: 0;
}

.plugin-preferences-dialog ::-webkit-scrollbar-thumb {
    background: #bbb;
    transition: all .2s;
    border-radius: 8px;
}

.plugin-preferences-dialog ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(95, 95, 95, 0.7);
}

.plugin-preferences-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    border-radius: 8px;
}

.plugin-preferences-left {
    width: 160px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #eee;
}

/***** search *****/
.plugin-preferences-search {
    height: 52px;
    padding: 8px 12px;
}

.plugin-preferences-search input {
    height: 30px;
    top: 50%;
    transform: translate(0, -50%);
    margin: 0;
    padding: 1px 8px;
    position: relative;
    border: 1px solid rgba(150, 162, 170, 0.4);
    border-radius: 4px;
    background: transparent;
    width: 100%;
}

/***** menu *****/
.plugin-preferences-menu {
    flex: 1;
    overflow: hidden auto;
    padding: 8px 8px 8px 12px;
}

.plugin-preferences-menu-item {
    box-sizing: border-box;
    line-height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    margin-bottom: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    user-select: none;
}

.plugin-preferences-menu-item:hover {
    background: rgba(77, 66, 86, 0.08);
}

.plugin-preferences-menu-item.active {
    color: #FFF;
    background: #0A84FF;
    pointer-events: none;
}

/***** right *****/
.plugin-preferences-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #F5F5F5;
}

.plugin-preferences-title {
    height: 52px;
    line-height: 52px;
    font-size: 16px;
    font-weight: 600;
    box-sizing: border-box;
    padding-left: 18px;
    border-bottom: 1px solid rgba(150, 162, 170, 0.2);
    color: rgb(65, 84, 98);
    cursor: grab;
}

.plugin-preferences-title.dragging {
    cursor: grabbing;
}

.plugin-preferences-close {
    position: absolute;
    right: 0;
    margin: 8px 8px 0 0;
    background: #fe6059;
    height: 18px;
    width: 18px;
    line-height: 18px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: default;
    text-align: center;
}

.plugin-preferences-close:hover {
    background: #d70015;
    color: #fff;
}

.plugin-preferences-main {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}
